<?php 
	//
	$sid = !empty($_GET[session_name()]) ? $_GET[session_name()] : '';
	//设置一下已有的sessonid进行初始化页面
	if($sid = ''){
		session_id($sid);
	}
	

	//开启session
	session_start();


	//给session赋值
	$username = "admin";
	$password = "admin";
	$usersex  = 1;
	$userage  = 20;

	$_SESSION['USERNAME'] = $username;
	$_SESSION['PASSWORD'] = $password;
	$_SESSION['USERSEX']  = $usersex;
	$_SESSION['USERAGE']  = $userage;

	echo "Hello!".$_SESSION['USERNAME'];

 ?>
 <br>
 <a href="10-session01.php?<?php echo SID; ?>">Session01</a><br>
 <a href="10-session02.php?<?php echo SID; ?>">Session02</a><br>
 <a href="10-session03.php?<?php echo SID; ?>">Session03</a><br>